package com.java;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class BeanLifeTest {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
        BeanLifeComponent component = context.getBean("myBean",BeanLifeComponent.class);
        component.sayHi();
        context.close();
    }
}
